﻿#coding=utf-8
'''
Created on 2017-06-13

@author: sandy
'''

import zlib
import Const
import Utils
import Pack as packet

def login(sid):
    return packet.pack("HH",Const.CMD_XX2MGR_LOGIN,sid)
    

def getConfig(cfgname):
    return packet.pack("Hs",Const.CMD_XX2MGR_GET_CONFIG,Utils.u2pstr(cfgname))

def getConfigEnd():
    return packet.pack("H",Const.CMD_XX2MGR_GET_CONFIG_END)

def exceptionLog(msg):
    return packet.pack("HS",Const.CMD_XX2MGR_EXCEPTION_LOG,zlib.compress(Utils.u2pstr(msg)))